/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.paris5.master2.guitarmaster.bean;

import java.util.Date;

/**
 *
 * @author mourad
 */
public class EcomComment implements EcomBean {
    
    //attributes
    private Integer idComment;
    private String description;
    private Date dateCreation;
    private EcomUser idUser;
    private EcomProductType idProductType;
    
    /*
     * accessors
     */
    public Date getDateCreation() {
        return dateCreation;
    }

    public String getDescription() {
        return description;
    }

    public Integer getIdComment() {
        return idComment;
    }

    public EcomProductType getIdProductType() {
        return idProductType;
    }

    public EcomUser getIdUser() {
        return idUser;
    }
    
    /*
     * Setters
     */
    public void setDateCreation(Date dateCreation) {
        this.dateCreation = dateCreation;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setIdComment(Integer idComment) {
        this.idComment = idComment;
    }

    public void setIdProductType(EcomProductType idProductType) {
        this.idProductType = idProductType;
    }

    public void setIdUser(EcomUser idUser) {
        this.idUser = idUser;
    }
    
    /*
     * useful
     */
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final EcomComment other = (EcomComment) obj;
        if (this.idComment != other.idComment && (this.idComment == null || !this.idComment.equals(other.idComment))) {
            return false;
        }
        if ((this.description == null) ? (other.description != null) : !this.description.equals(other.description)) {
            return false;
        }
        if (this.dateCreation != other.dateCreation && (this.dateCreation == null || !this.dateCreation.equals(other.dateCreation))) {
            return false;
        }
        if (this.idUser != other.idUser && (this.idUser == null || !this.idUser.equals(other.idUser))) {
            return false;
        }
        if (this.idProductType != other.idProductType && (this.idProductType == null || !this.idProductType.equals(other.idProductType))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Comment{" + "idComment=" + idComment + ", description=" + description + ", dateCreation=" + dateCreation + ", idUser=" + idUser + ", idProductType=" + idProductType + '}';
    }
}
